package com.dgut.lotterySystem.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;


@AllArgsConstructor
@Getter
public enum IdentityEnum {
    ADMIN("管理者"),
    NORMAL("普通成员");
    private String message;

    public static IdentityEnum forName(String name){
        for (IdentityEnum identityEnum:IdentityEnum.values()) {
            if(identityEnum.name().equalsIgnoreCase(name)) return identityEnum;//通过比较字母是否相同，返回对象
        }
        return null;
    }
}
